<template>
    <div class="AppInput">
        <input type="text" v-model="_value" :placeholder="placeholder"/>
    </div>
</template>

<script>
    export default {
        name: "AppInput",
        props: {
            type: {
                default: 'text',
                type: String
            },
            placeholder: {
                default: '',
                type: String
            },
            value: {
                default: ''
            }
        },
        computed: {
            _value: {
                get() {
                    return this.value;
                },
                set(val) {
                    this.$emit('input', val);
                }
            }
        }
    }
</script>

<style lang="scss" scoped>
    .AppInput {
        width: 100%;
        height: 40/3.75+vw;
        background: #C8292E;
        color: #fff;
        border-radius: 40/3.75+vw;
        input {
            outline: none;
            background: transparent;
            border: none;
            width: 100%;
            height: 100%;
            text-indent: 20/3.75+vw;
            border-radius: 40/3.75+vw;
            font-size: 14/3.75+vw;
            color: #fff;
            &::placeholder {
                color: #f2f2f2;
            }
        }
    }
</style>
